Skip to content

Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265

Open
cozdas wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
cozdas:cozdas/Add_SMPTE_CLF_Support
Open

Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files#2265
cozdas wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
cozdas:cozdas/Add_SMPTE_CLF_Support

Conversation

@cozdas
Copy link
Collaborator

@cozdas cozdas commented Feb 11, 2026

Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files

  • Added "Id" element support per the spec.

  • Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)

  • CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.

  • Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)

  • CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.

  • Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements

  • ociomakeclf tool now takes "--generateid" switch for inserting newly added "Id element" into the target clf file.

TODO:

  • Description and Descriptor elements need to collect the language attribute.

  • non-default namespace attributes (e.g. xmlns:foo) need to be collected as root level attributes.

  • Those two TODO items need some re-factoring in the data collection code.

…files.

- Added "Id" element support per the spec.

- Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)

- CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.

- Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)

- CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.

- Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements

- ociomakeclf tool now takes "--generateid" switch to for inserting newly added "Id element" into the target clf file.

TODO:

- Description and Descriptor elements need to collect the language attribute.

- non-default namespace attributes (e.g. xmlns:foo) needs to be collected as root level attributes.

- Those two TODO items need some re-factoring in the data collection code.

Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
@cozdas cozdas changed the title Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files Adsk Contrib - Add Support for SMPTE ST 2036-1 compliant CLF files Feb 11, 2026
Copy link
Collaborator

@zachlewis zachlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I may have missed this, but do we have tests for CLFs with more than one InputDescriptor / OutputDescriptor?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean CTF Reference nodes do not support SMPTE-flavored CLF?

(I suppose I'm okay with this, since Reference nodes aren't publicly documented or explicitly supported)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the smpte_all_metadata test in FileFormatCTF_tests.cpp checks multiple OutputDescriptors (line 1464).

References will support any loadable LUT format. The one the test uses happens to be pre-SMPTE, but I agree with you that it could give the wrong impression. We will update that to reference one of the other files.

Thanks for the quick review Zach!

* preferred mechanism in the SMPTE ST 2036-1 version of the CLF format. If
* present, it is only available from the top-level FormatMetadata.
*/
extern OCIOEXPORT const char * METADATA_ID_ELEMENT;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, should this be added to PyTypes.cpp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants